package algorithm.poj.p1000;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLDecoder;
import java.text.DecimalFormat;
import java.util.StringTokenizer;

/**
 * 分析：
 * 
 * 实现：
 * 
 * 经验：
 * 
 * 教训：
 * 
 * 
 * @author wong.tong@gmail.com
 *
 */
public class P1039 {

	public static void main(String[] args) throws Exception {

		InputStream input = null;
		if (false) {
			input = System.in;
		} else {
			URL url = P1039.class.getResource("P1039.txt");
			File file = new File(URLDecoder.decode(url.getPath(), "UTF-8"));
			input = new FileInputStream(file);
		}
		
		BufferedReader stdin = new BufferedReader(new InputStreamReader(input));

		DecimalFormat f = new DecimalFormat("##0.00");
		String line = stdin.readLine();
		while (line != null && !"0".equals(line)) {
			int n = Integer.valueOf(line.trim());
			Interval[] intervals = new Interval[n];
			Point[] ps = new Point[2*n];
			for (int i = 0; i < n; i ++) {
				Point s = new Point(stdin.readLine());
				Point e = new Point(s.x, s.y-1.0f);
				intervals[i] = new Interval(s, e);
				ps[2*i] = s;
				ps[2*i+1] = e;
			}

			boolean through = false;
			Double max = null;
			for (int i = 0; i < ps.length; i ++) {
				Point s = ps[i];
				for (int j = i+1; j < ps.length; j ++) {
					Point e = ps[j];
					if (s.x != e.x) {
						double x = intervals[0].s.x;
						double y = (e.y-s.y)/(e.x-s.x)*(intervals[0].s.x-s.x) + s.y;
						if (y <= intervals[0].s.y && y >= intervals[0].e.y) {
							Double mx = maxX(x, y, intervals);
							if (mx == null) {
								through = true;
								break;
							} else {
								if (max == null) max = mx;
								else if (x > max) max = mx;
							}
						}
					}
				}
			}
			if (through) {
				System.out.println("Through all the pipe.");
			} else {
				System.out.println(f.format(max));
			}
			line = stdin.readLine();
		}
	}
	
	/**
	 * return the max length of light emit from point (x0, y) in interval[0]
	 * @param y
	 * @return
	 */
	private static Double maxX(double x, double y, Interval[] intervals) {
	
		double eps = 0.0e-12;
		double x0 = x;
		double y0 = y;
		double x1 = intervals[1].s.x;
		double y1 = intervals[1].s.y;
		double y2 = intervals[1].e.y;
		for (int i = 2; i < intervals.length; i ++) {
			double x2 = intervals[i].s.x;
			double y3 = (x2-x0)/(x1-x0)*(y1-y0) + y0;
			double y4 = (x2-x0)/(x1-x0)*(y2-y0) + y0;
			if (y3 < intervals[i].e.y - eps) {
				double y5 = (x0-x2)/(x1-x2)*(intervals[i-1].e.y-intervals[i].e.y) + intervals[i].e.y;
				double a = (y0-y5)/(intervals[i].e.y-y3);
				return (a*x2 + x0)/(1+a);
			} else if (y4 > intervals[i].s.y + eps) {
				double y5 = (x0-x2)/(x1-x2)*(intervals[i-1].s.y-intervals[i].s.y) + intervals[i].s.y;
				double a = (y5-y0)/(y4-intervals[i].s.y);
				return (a*x2 + x0)/(1+a);
			} else {
				x1 = x2;
				y1 = Math.min(y3, intervals[i].s.y);
				y2 = Math.max(y4, intervals[i].e.y);
			}
		}
		return null;
	}
	
	private static class Point {
		double x;
		double y;
		public Point(String str) {
			StringTokenizer st = new StringTokenizer(str);
			this.x = Double.valueOf(st.nextToken());
			this.y = Double.valueOf(st.nextToken());
		}
		public Point(double x, double y) {
			this.x = x;
			this.y = y;
		}
	}
	
	private static class Interval {
		Point s;
		Point e;
		public Interval(Point s, Point e) {
			this.s = s;
			this.e = e;
		}
	}
}